#pragma once

#include <string>

#include "protocol/udpserver.h"
#include "protocol/tcpserver.h"


class UdpServer {
public:
    UdpServer(uint16_t server_port, uint16_t clinet_port);
    void UDPServerStart();
    void UDPServerSend(std::string ipv4, std::string msg);
    void UDPServerSend(std::string ipv4, uint16_t port, std::string msg);
    std::shared_ptr<UDPServer<>> get_udp_server() {return _udpServer;}  
    // void TCPServerStart();
    // void TCPServerStop();
private:
    std::shared_ptr<UDPServer<>> _udpServer;
    uint16_t _server_port;
    // 上位机通信
    uint16_t _clinet_port;
};